Fix missing named-arg validation for compiled format strings#4638
Merged
vitaut merged 6 commits intofmtlib:masterfrom Jan 4, 2026
Merged
Fix missing named-arg validation for compiled format strings#4638vitaut merged 6 commits intofmtlib:masterfrom
vitaut merged 6 commits intofmtlib:masterfrom
Conversation
…t string contains dynamic names, or an argument id is found for every named argument
6bcf243 to
3c44f2d
Compare
vitaut
requested changes
Jan 1, 2026
Contributor
vitaut
left a comment
There was a problem hiding this comment.
Thanks for the PR! Overall looks good, but please address the inline comments.
Contributor
|
Merged, thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
DYNAMIC_NAMEStype parameter to compile_format_string, which is set to true when runtime named arguments are present. Fixed missing named-arg validation by asserting that if DYNAMIC_NAMES is false, thearg_indexproduced byget_arg_index_by_name(arg_id_result.arg_id.name, Args{})in the compile time parser must not be -1.Also added a few tests under
test/compile-error-testto verify intended behavior.#4124